﻿import request from '/@/utils/request';
enum Api {
  AddIotdevice = '/api/iotdevice/add',
  DeleteIotdevice = '/api/iotdevice/delete',
  UpdateIotdevice = '/api/iotdevice/update',
  PageIotdevice = '/api/iotdevice/page',
  DetailIotdevice = '/api/iotdevice/detail',
}

// 增加设备管理
export const addIotdevice = (params?: any) =>
	request({
		url: Api.AddIotdevice,
		method: 'post',
		data: params,
	});

// 删除设备管理
export const deleteIotdevice = (params?: any) => 
	request({
			url: Api.DeleteIotdevice,
			method: 'post',
			data: params,
		});

// 编辑设备管理
export const updateIotdevice = (params?: any) => 
	request({
			url: Api.UpdateIotdevice,
			method: 'post',
			data: params,
		});

// 分页查询设备管理
export const pageIotdevice = (params?: any) => 
	request({
			url: Api.PageIotdevice,
			method: 'post',
			data: params,
		});

// 详情设备管理
export const detailIotdevice = (id: any) => 
	request({
			url: Api.DetailIotdevice,
			method: 'get',
			data: { id },
		});


